home *** CD-ROM | disk | FTP | other *** search
/ CICA 1994 April / CICA Shareware for Windows CD-ROM (Walnut Creek CD-ROM)(April 1994).ISO / win3 / nt / nflex.exe / OEMSETUP.INF < prev   
INI File  |  1994-03-10  |  32KB  |  844 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     EISA
  5.     "Jazz-Internal Bus"
  6. [Options]
  7.     BONSAI
  8.     RODAN
  9.     NETFLX
  10.     DURANGO
  11. [FileConstants]
  12. UtilityInf      = "UTILITY.INF"
  13. subroutineinf   = "SUBROUTN.INF"
  14. SoftwareType    = "driver"
  15. Exit_Code       = 0
  16. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  17. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  18. NETFLX_1BYTE    = 6361358
  19. DURANGO_1BYTE   = 6295822
  20. BONSAI_1BYTE    = 6426894
  21. RODAN_1BYTE     = 6492430
  22. BonsaiString    = "BONSAI"
  23. RodanString     = "RODAN"
  24. Manufacturer    = "Microsoft"
  25. ProductMajorVersion     = "3"
  26. ProductMinorVersion     = "1"
  27. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  28. ProductSoftwareName     = "NETFLX"
  29. ProductSoftwareImagePath = "\SystemRoot\system32\drivers\netflx.sys"
  30. NetRuleSoftwareType     = "netflxSys ndisDriver netflxDriver"
  31. NetRuleSoftwareUse      = $(SoftwareType)
  32. NetRuleSoftwareBindForm = """NetflxSys"" yes no container"
  33. NetRuleSoftwareClass    = {"netflxDriver basic"}
  34. NetRuleSoftwareBindable = {"netflxDriver netflxAdapter non exclusive 100"}
  35. ProductHardwareName     = "NETFLX"
  36. NetRuleHardwareType     = "netflx netflxAdapter"
  37. NetRuleHardwareBindForm = " yes yes container"
  38. NetRuleHardwareClass    = {"netflxAdapter basic"}
  39. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  40. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  41. NetCardKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\Windows NT\CurrentVersion\NetworkCards"
  42. [GeneralConstants]
  43. from      = ""
  44. to        = ""
  45. ExitCodeOk     = 0
  46. ExitCodeCancel = 1
  47. ExitCodeFatal  = 2
  48. KeyNull         = ""
  49. MAXIMUM_ALLOWED   = 33554432
  50. RegistryErrorIndex = NO_ERROR
  51. KeyProduct      = ""
  52. KeyParameters   = ""
  53. TRUE            = 1
  54. FALSE           = 0
  55. NoTitle            = 0
  56. ExitState   = "Active"
  57. OldVersionExisted = $(FALSE)
  58. DriverPath      = $(!STF_NTPATH)\drivers
  59. AdpList = {}
  60. DualNicList = {}
  61. AddAdpCount = 0
  62. [date]
  63.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  64. [Identify]
  65.     read-syms Identification
  66.     set Status     = STATUS_SUCCESSFUL
  67.     set Identifier = $(OptionType)
  68.     set Media      = #("Source Media Descriptions", 1, 1)
  69.     Return $(Status) $(Identifier) $(Media)
  70. [ReturnOptions]
  71.     set Status        = STATUS_FAILED
  72.     set OptionList     = {}
  73.     set OptionTextList = {}
  74.     set LanguageList = ^(LanguagesSupported, 1)
  75.     Ifcontains(i) $($0) in $(LanguageList)
  76.         ifstr(i) $($1) == ""
  77.            goto returnoptions
  78.         endif
  79.         set PlatformList = ^(PlatformsSupported, 1)
  80.         Ifcontains(i) $($1) in $(PlatformList)
  81.            goto returnoptions
  82.         else
  83.            set Status = STATUS_NOTSUPPORTED
  84.            goto finish_ReturnOptions
  85.         endif
  86.     else
  87.         set Status = STATUS_NOLANGUAGE
  88.         goto finish_ReturnOptions
  89.     endif
  90. returnoptions = +
  91.     set OptionList     = ^(Options, 1)
  92.     set OptionTextList = ^(OptionsText$($0), 1)
  93.     set Status         = STATUS_SUCCESSFUL
  94. finish_ReturnOptions = +
  95.     Return $(Status) $(OptionList) $(OptionTextList)
  96. [InstallOption]
  97.     set Option   = $($1)
  98.     set SrcDir   = $($2)
  99.     set AddCopy  = $($3)
  100.     set DoCopy   = $($4)
  101.     set DoConfig = $($5)
  102.     set LanguageList = ^(LanguagesSupported, 1)
  103.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  104.         Return STATUS_NOLANGUAGE
  105.     endif
  106.     Debug-Output "OEMNADNF.INF: STF_CWDIR is: "$(!STF_CWDIR)
  107.     Debug-Output "OEMNADNF.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  108.     set-subst LF = "\n"
  109.     read-syms GeneralConstants
  110.     read-syms FileConstants
  111.     read-syms DialogConstants$(!STF_LANGUAGE)
  112.     ifstr(i) $(!NTN_Origination) == "NCPA"
  113.         set Continue = $(OK)
  114.     endif
  115.     read-syms FileConstants$(!STF_LANGUAGE)
  116.     detect date
  117.     set-title  $(FunctionTitle)
  118.     set to   = Begin
  119.     set from = Begin
  120.     set CommonStatus = STATUS_SUCCESSFUL
  121.     EndWait
  122. Begin = +
  123.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  124.         set StartLabel = removeadapter
  125.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  126.         set StartLabel = UpgradeSoftware
  127.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  128.         set StartLabel = bindingadapter
  129.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  130.         set CommonStatus = STATUS_REBOOT
  131.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  132.             Debug-Output "Cannot configure the Compaq Netflex driver software."
  133.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  134.         else
  135.             Debug-Output "Cannot configure the Compaq Netflex adapter card."
  136.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  137.         endif
  138.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  139.             Debug-Output "ShellCode error: cannot get an error string."
  140.             goto ShellCodeError
  141.         endif
  142.         set Error = $($R0)
  143.         set from = end
  144.         set to = end
  145.         goto nonfatal
  146.     else
  147.         set StartLabel = installadapter
  148.         set OEM_ABANDON_OPTIONS = {}
  149.         set OEM_ABANDON_SOFTWARE = FALSE
  150.         set OEM_ABANDON_ON = TRUE
  151.     endif
  152.     set from = $(fatal)
  153.     set to = $(fatal)
  154.     goto $(StartLabel)
  155. installadapter = +
  156.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  157.     Ifstr $(KeyProduct) != $(KeyNull)
  158.     CloseRegKey $(KeyProduct)
  159.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  160.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  161.                 $(ProductVersion)
  162.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  163.                 goto ShellCodeError
  164.             endif
  165.             goto end
  166.         else
  167.             set OldVersionExisted = $(TRUE)
  168.         endif
  169.     endif
  170.     goto nextstep
  171. configureadapter = +
  172.     set Error = "Configure: Sorry, not yet implemented."
  173.     goto fatal
  174. nextstep = +
  175.     StartWait
  176.     set DualPort = FALSE
  177.  
  178.     ifstr $(Option) == "NETFLX"
  179.         Shell $(UtilityInf), EISAFindBus, $(NETFLX_1BYTE)
  180.     else-ifstr $(Option) == "DURANGO"
  181.         Shell $(UtilityInf), EISAFindBus, $(DURANGO_1BYTE)
  182.     else-ifstr $(Option) == "BONSAI"
  183.         Shell $(UtilityInf), EISAFindBus, $(BONSAI_1BYTE)
  184.         set DualPort = TRUE
  185.     else
  186.         Shell $(UtilityInf), EISAFindBus, $(RODAN_1BYTE)
  187.         set DualPort = TRUE
  188.     endif
  189.  
  190.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191.         goto ShellCodeError
  192.     endif
  193.     ifstr $($R0) != "NO_ERROR"
  194.         set Error = $($R0)
  195.         goto fatal
  196.     endif
  197.     ifstr(i) $($R1) == {}
  198.         set Error = $(CANNOT_FIND_ANY_CARD)
  199.         set CommonStatus = STATUS_USERCANCEL
  200.         set from = end
  201.         goto nonfatal
  202.     endif
  203.     set AdapterList = $($R1)
  204.     ifint $(OldVersionExisted) == $(FALSE)
  205.         ifstr(i) $(!NTN_InstallMode) == "install"
  206.            Ifstr(i) $(DoCopy) == "YES"
  207.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  208.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  209.                   Goto ShellCodeError
  210.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  211.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  212.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  213.                       goto ShellCodeError
  214.                   endif
  215.                   set Error = $($R0)
  216.                   Goto fatal
  217.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  218.                   Goto successful
  219.               Endif
  220.               Set SrcDir = $($R1)
  221.            Endif
  222.            install "Install-Option"
  223.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  224.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  225.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  226.                   goto ShellCodeError
  227.               endif
  228.               set Error = $($R0)
  229.               goto fatal
  230.            endif
  231.         endif
  232.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  233.             $(ProductSoftwareName), +
  234.             $(ProductSoftwareName), +
  235.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  236.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  237.             $(NetEventDLL)
  238.         Set OEM_ABANDON_SOFTWARE = TRUE
  239.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  240.             goto ShellCodeError
  241.         endif
  242.         set RegistryErrorIndex = $($R0)
  243.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  244.             EndWait
  245.             CloseRegKey $($R1)
  246.             CloseRegKey $($R2)
  247.             CloseRegKey $($R3)
  248.             CloseRegKey $($R4)
  249.             CloseRegKey $($R5)
  250.             goto fatalregistry
  251.         endif
  252.         set SoftProductKey      = $($R1)
  253.         Set SoftNetRuleKey      = $($R2)
  254.         Set SoftServiceKey      = $($R3)
  255.         Set SoftParameterKey    = $($R4)
  256.         Set SoftLinkageKey      = $($R5)
  257.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  258.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  259.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  260.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  261.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  262.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  263.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  264.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  265.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  266.             goto ShellCodeError
  267.         endif
  268.         set RegistryErrorIndex = $($R0)
  269.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  270.             EndWait
  271.             CloseRegKey $(SoftProductKey)
  272.             CloseRegKey $(SoftNetRuleKey)
  273.             CloseRegKey $(SoftServiceKey)
  274.             CloseRegKey $(SoftParameterKey)
  275.             CloseRegKey $(SoftLinkageKey)
  276.             goto fatalregistry
  277.         endif
  278.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  279.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  280.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  281.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  282.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  283.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  284.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  285.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  286.             goto ShellCodeError
  287.         endif
  288.         set RegistryErrorIndex = $($R0)
  289.         CloseRegKey $(SoftProductKey)
  290.         CloseRegKey $(SoftNetRuleKey)
  291.         CloseRegKey $(SoftServiceKey)
  292.         CloseRegKey $(SoftParameterKey)
  293.         CloseRegKey $(SoftLinkageKey)
  294.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  295.             EndWait
  296.             goto fatalregistry
  297.         endif
  298.     endif
  299.  
  300.     ForListDo $(AdapterList)
  301.         set BusNum = *($($),1)
  302.         set SlotNum = *($($),2)
  303.         Debug-Output $(BusNum)
  304.         Debug-Output $(SlotNum)
  305.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  306.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  307.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  308.             goto ShellCodeError
  309.         endif
  310.         ifstr $($R0) != "NO_ERROR"
  311.             set Error = $($R0)
  312.             goto fatal
  313.         endif
  314.  
  315.         set tempvar = $($R1)
  316.  
  317. ;******************************
  318. ;
  319. ;    ADD DUAL PORT CONTROLLER
  320. ;
  321. ;******************************
  322.  
  323.         ifstr(i) $(DualPort) == TRUE
  324.             set AdpList = { {1},{2} }
  325.         else
  326.             set AdpList = { {1} }
  327.         endif
  328.         set AddAdpCount = 0
  329.  
  330.         ifstr(i) $(tempvar) != "YES"
  331.  
  332.           ForListDo $(AdpList)
  333.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  334.             ifint $($R4) != -1
  335.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  336.             endif
  337.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  338.                 goto ShellCodeError
  339.             endif
  340.             set RegistryErrorIndex = $($R0)
  341.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  342.                 EndWait
  343.                 CloseRegKey $($R1)
  344.                 CloseRegKey $($R2)
  345.                 CloseRegKey $($R3)
  346.                 goto fatalregistry
  347.             endif
  348.             Set HardNetCardKey      = $($R1)
  349.             Set HardNetRuleKey      = $($R2)
  350.             Set HardParameterKey    = $($R3)
  351.             set AdapterNumber       = $($R4)
  352.             set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  353.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  354.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  355.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  356.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  357.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  358.             Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  359.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  360.                 goto ShellCodeError
  361.             endif
  362.  
  363.             ifstr $(Option) == "NETFLX"
  364.                 LoadLibrary "x" $(!STF_CWDDIR)netflx.dll !NETFLEX_HANDLE
  365.                 set Option_1Byte = $(NETFLX_1BYTE)
  366.                 LibraryProcedure Result $(!NETFLEX_HANDLE), GetNetFlexMediaType, "EISAAdapter\"$(BusNum), $(SlotNum)
  367.                 set MediaType = *($(Result),1)
  368.                 FreeLibrary $(!NETFLEX_HANDLE)
  369.             else-ifstr $(Option) == "DURANGO"
  370.                 set Option_1Byte = $(DURANGO_1BYTE)
  371.                 set MediaType = 2
  372.             else-ifstr $(Option) == "BONSAI"
  373.                 set Option_1Byte = $(BONSAI_1BYTE)
  374.                 set MediaType = 1
  375.             else
  376.                 set Option_1Byte = $(RODAN_1BYTE)
  377.                 set MediaType = 2
  378.             endif
  379.  
  380. ;**************************************************************************
  381. ;
  382. ;  Get the adapter numbers associated with installing 2 ports from 1 card
  383. ;
  384. ;**************************************************************************
  385.  
  386.              ifint $(AddAdpCount) == 0
  387.                 Shell $(UtilityInf), AssignAdapterNumber
  388.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  389.                      goto ShellCodeError
  390.                 endif
  391.                 set AdpNumber1 = $(AdapterNumber)
  392.                 set AdpNumber2 = $($R1)
  393.              endif
  394.  
  395.              ifstr(i) $(DualPort) == TRUE
  396.                 ifint $(AddAdpCount) == 0
  397.                    set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  398.                            {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  399.                            {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  400.                            {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  401.                            {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  402.                            {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 1},+
  403.                            {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber2) }}
  404.                 else
  405.                    set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  406.                            {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  407.                            {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  408.                            {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  409.                            {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  410.                            {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 2},+
  411.                            {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber1) }}
  412.                 endif
  413.              else
  414.                 set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  415.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  416.                        {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  417.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  418.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  419.          endif
  420.  
  421.              Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  422.              ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.                  goto ShellCodeError
  424.              endif
  425.              set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  426.              set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  427.              set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  428.                                  {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  429.                                  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  430.                                  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  431.              Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  432.              CloseRegKey $(HardNetCardKey)
  433.              CloseRegKey $(HardNetRuleKey)
  434.              CloseRegKey $(HardParameterKey)
  435.              ifint $($ShellCode) != $(!SHELL_CODE_OK)
  436.                  goto ShellCodeError
  437.              endif
  438.  
  439. ;***************************************************
  440. ;
  441. ;   If it's a dual port nic, install the next one
  442. ;
  443. ;***************************************************
  444.  
  445.              ifstr(i) $(DualPort) == TRUE
  446.                 set-add AddAdpCount = $(AddAdpCount),1
  447.              endif
  448.  
  449.           EndForListDo
  450.       endif
  451.     EndForListDo
  452.     goto writeparameters
  453. writeparameters = +
  454.     EndWait
  455.     goto successful
  456. bindingadapter =+
  457.     set Error = "Binding: Sorry, not yet implemented."
  458.     goto fatal
  459. removeadapter = +
  460.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  461.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  462.             $(ProductSoftwareName)
  463.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  464.             Debug-Output "ShellCode error"
  465.             goto ShellCodeError
  466.         endif
  467.         set RegistryErrorIndex = $($R0)
  468.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  469.             goto fatalregistry
  470.         endif
  471.     else
  472.  
  473. ;
  474. ;  Check to see if it is a dual port adapter
  475. ;
  476.  
  477.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase)"\NetRules" +
  478.             $(MAXIMUM_ALLOWED) NetRulesKey
  479.         Ifstr $(NetRulesKey) == $(KeyNull)
  480.             Debug-Output "UTILITY.INF: Could not open NetRules key"
  481.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  482.             goto ShellCodeError
  483.         endif
  484.  
  485.         GetRegValue $(NetRulesKey), "InfOption", RA_InfOptionInfo
  486.         set RA_InfOption = *($(RA_InfOptionInfo), 4)
  487.  
  488. ;
  489. ;  If it is a dual port adapter, remove both port in this order:
  490. ;  Second port, First port.
  491. ;
  492.         ifstr(i) $(RA_InfOption) == $(BonsaiString)
  493.            goto RemoveSecondAdapter
  494.         else-ifstr(i) $(RA_InfOption) == $(RodanString)
  495.            goto RemoveSecondAdapter
  496.         else
  497.            goto RemoveOriginalAdapter
  498.         endif
  499.  
  500. RemoveSecondAdapter = +
  501.  
  502.         Shell "", GetSecondAdapter, $(!NTN_RegBase)
  503.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  504.            Debug-Output "ShellCode error"
  505.            goto ShellCodeError
  506.         endif
  507.         set RegistryErrorIndex = $($R0)
  508.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  509.             goto fatalregistry
  510.         endif
  511.         set PortTwo_RegBase = $($R1)
  512.  
  513. ;
  514. ;  Remove second adapter
  515. ;
  516.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  517.               $(ProductSoftwareName), $(PortTwo_RegBase)
  518.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  519.            Debug-Output "ShellCode error"
  520.            goto ShellCodeError
  521.         endif
  522.         set RegistryErrorIndex = $($R0)
  523.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  524.            goto fatalregistry
  525.         endif
  526. ;
  527. ;  Remove first adapter of a dual port adapter or single port adapter
  528. ;
  529.  
  530. RemoveOriginalAdapter = +
  531.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  532.               $(ProductSoftwareName), $(!NTN_RegBase)
  533.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  534.            Debug-Output "ShellCode error"
  535.            goto ShellCodeError
  536.         endif
  537.         set RegistryErrorIndex = $($R0)
  538.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  539.            goto fatalregistry
  540.         endif
  541.     endif
  542.     goto end
  543. UpgradeSoftware = +
  544.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  545.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  546.         Ifstr $(KeyProduct) != $(KeyNull)
  547.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  548.             set Version = *($(VersionInfo), 4)
  549.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  550.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  551.                 Debug-Output "ShellCode error"
  552.                 goto ShellCodeError
  553.             endif
  554.             set !UG_Filename = $($R0)
  555.             ifstr(i) $(!UG_Filename) != ""
  556.                 install "Install-Update"
  557.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  558.                     goto fatal
  559.                 endif
  560.             endif
  561.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  562.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  563.             ifint $(Version) != $(ProductVersion)
  564.             endif
  565.             CloseRegKey $(KeyProduct)
  566.         else
  567.             goto fatalregistry
  568.         endif
  569.     else
  570.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  571.               $(MAXIMUM_ALLOWED) NetworkCardKey
  572.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  573.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  574.             set ServiceName = *($(ServiceNameInfo), 4)
  575.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  576.                 $(MAXIMUM_ALLOWED) NetRuleKey
  577.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  578.             else
  579.                 goto fatalregistry
  580.             endif
  581.             CloseRegKey $(NetRules)
  582.             CloseRegKey $(NetworkCardKey)
  583.         else
  584.             goto fatalregistry
  585.         endif
  586.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ServiceName) +
  587.               $(MAXIMUM_ALLOWED) ServiceKey
  588.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  589.             OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  590.             Ifstr $(KeyProduct) != $(KeyNull)
  591.                GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  592.                set Version = *($(VersionInfo), 4)
  593.                Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  594.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  595.                   Debug-Output "ShellCode error"
  596.                goto ShellCodeError
  597.             endif
  598.             set !UG_Filename = $($R0)
  599.             ifstr(i) $(!UG_Filename) != ""
  600.                install "Install-Update"
  601.                ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  602.                   goto fatal
  603.                endif
  604.             endif
  605.             CloseRegKey $(ServiceKey)
  606.         else
  607.             goto fatalregistry
  608.         endif
  609.     endif
  610.     goto end
  611. successful = +
  612.     goto end
  613. abandon = +
  614.     ForListDo $(OEM_ABANDON_OPTIONS)
  615.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  616.             $(ProductSoftwareName), $($)
  617.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  618.             Debug-Output "ShellCode error"
  619.             goto ShellCodeError
  620.         endif
  621.         set RegistryErrorIndex = $($R0)
  622.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  623.             goto fatalregistry
  624.         endif
  625.     EndForListDo
  626.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  627.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  628.             $(ProductSoftwareName), FALSE
  629.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  630.             Debug-Output "ShellCode error"
  631.             goto ShellCodeError
  632.         endif
  633.         set RegistryErrorIndex = $($R0)
  634.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  635.             goto fatalregistry
  636.         endif
  637.     endif
  638.     goto end
  639. warning = +
  640.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  641.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  642.         goto ShellCodeError
  643.     endif
  644.     ifstr(i) $($R1) == "OK"
  645.         goto $(to)
  646.     else-ifstr(i) $($R1) == "CANCEL"
  647.         goto $(from)
  648.     else
  649.         goto end
  650.     endif
  651. nonfatal = +
  652.     ifstr(i) $(Error) == ""
  653.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  654.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  655.             goto ShellCodeError
  656.         endif
  657.         set Error = $($R0)
  658.     endif
  659.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  660.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  661.         goto ShellCodeError
  662.     endif
  663.     ifstr(i) $($R1) == "OK"
  664.         goto $(from)
  665.     else
  666.         goto end
  667.     endif
  668. fatalregistry = +
  669.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  670.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  671.         goto ShellCodeError
  672.     endif
  673.     set Error = $($R0)
  674.     goto fatal
  675. fatal = +
  676.     ifstr(i) $(Error) == ""
  677.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  678.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  679.             goto ShellCodeError
  680.         endif
  681.         set Error = $($R0)
  682.     endif
  683.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  684.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  685.         goto ShellCodeError
  686.     endif
  687.     goto setfailed
  688. ShellCodeError = +
  689.     set DlgType      = "MessageBox"
  690.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  691.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  692.     set STF_MB_TYPE  = 1
  693.     set STF_MB_ICON  = 3
  694.     set STF_MB_DEF   = 1
  695.     ui start "Error Message"
  696.     goto setfailed
  697. setfailed = +
  698.     set CommonStatus = STATUS_FAILED
  699.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  700.         set OEM_ABANDON_ON = FALSE
  701.         goto abandon
  702.     endif
  703.     goto end
  704. end = +
  705.     goto term
  706. term = +
  707.     Return $(CommonStatus)
  708.  
  709. ;*************************************************************************
  710. ;
  711. ;   SECTION:    GetSecondAdapter
  712. ;
  713. ;   PURPOSE:    Find the other NIC to be removed with the removal of
  714. ;               one of the heads associated with the dual-headed NICs
  715. ;
  716. ;   ARGUMENTS:  $0   The compress ID of the EISA card
  717. ;
  718. ;   RETURNS:    $R0  Registry error code or zero if no error
  719. ;               $R1  The number of the second adapter
  720. ;
  721. ;   REFERENCES: Nothing
  722. ;
  723. ;   MODIFIES:   Nothing
  724. ;
  725. ;*************************************************************************
  726. [GetSecondAdapter]
  727.  
  728.     read-syms GeneralConstants
  729.     read-syms FileConstants
  730.  
  731.     Split-String $($0), "\", CardList
  732.     set GS_NetCardNum   = *($(CardList),11)
  733.     set GS_HardKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)$(GS_NetCardNum)"\Parameters"
  734.  
  735.     set RegistryErrorIndex      = NO_ERROR
  736.     OpenRegKey $(!REG_H_LOCAL) "" $(GS_HardKeyName) $(MAXIMUM_ALLOWED) GS_ParametersKey
  737.  
  738.     Ifstr $(GS_ParametersKey) == $(KeyNull)
  739.        set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  740.        goto GS_Return
  741.     endif
  742.  
  743.     GetRegValue $(GS_ParametersKey), "PairNumber", GS_AdpNumberInfo
  744.     set GS_AdpNumber = *($(GS_AdpNumberInfo),4)
  745.     ifint $(GS_AdpNumber) < 10
  746.       set TempNum = "0"$(GS_AdpNumber)
  747.     else
  748.       set TempNum = $(GS_AdpNumber)
  749.     endif
  750.  
  751.     set ReturnPath = $(NetCardKeyName)"\"$(TempNum)
  752.  
  753. GS_Return = +
  754.     return $(RegistryErrorIndex) $(ReturnPath)
  755. [Install-Option]
  756.     set STF_VITAL = ""
  757.     ifstr(i) $(AddCopy) == "YES"
  758.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  759.         AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  760.     endif
  761.     ifstr(i) $(DoCopy) == "YES"
  762.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  763.        CopyFilesInCopyList
  764.     endif
  765.     ifstr(i) $(DoConfig) == "YES"
  766.     endif
  767.     Exit
  768. [Install-Update]
  769.    set STF_VITAL        = ""
  770.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  771.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  772.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  773.    ifstr $(Option) == "NETFLX"
  774.       AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  775.    endif
  776.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  777.    CopyFilesInCopyList
  778.    exit
  779. #if !defined(ACORN)
  780. [Source Media Descriptions]
  781.     1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  782.     2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  783.     3  = "COMPAQ NT Support Software Disk", TAGFILE = cpqntssd
  784. [ProductType]
  785. STF_PRODUCT  = Winnt
  786. STF_PLATFORM = I386
  787. [Files-Inf]
  788. 3,  oemsetup.inf,    SIZE=1000, RENAME=$(!UG_Filename)
  789. [Files-DLL]
  790. 3,NETFLX.DLL , SIZE=999
  791. [Files-DURANGO]
  792. 3,NETFLX.BIN , SIZE=999
  793. 3,NETFLX.SYS , SIZE=999
  794. [Files-CPQTOK]
  795. 3,NETFLX.BIN , SIZE=999
  796. 3,NETFLX.SYS , SIZE=999
  797. [Files-NETFLX]
  798. 3,NETFLX.BIN , SIZE=999
  799. 3,NETFLX.SYS , SIZE=999
  800. [Files-BONSAI]
  801. 3,NETFLX.BIN , SIZE=999
  802. 3,NETFLX.SYS , SIZE=999
  803. [Files-RODAN]
  804. 3,NETFLX.BIN , SIZE=999
  805. 3,NETFLX.SYS , SIZE=999
  806. [LanguagesSupported]
  807.     ENG
  808. [OptionsTextENG]
  809.     BONSAI     = "COMPAQ NetFlex-2 DualPort ENET Controller"
  810.     RODAN      = "COMPAQ NetFlex-2 DualPort TR Controller"
  811.     NETFLX     = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  812.     DURANGO    = "COMPAQ NetFlex-2 TR Controller"
  813. [FileConstantsENG]
  814. ProCaption   = "Windows NT Setup"
  815. ProCancel    = "Cance&l"
  816. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  817.                "Are you sure you want to cancel copying files?"
  818. ProCancelCap = "Network Setup Message"
  819. ProText1     = "Copying:"
  820. ProText2     = "To:"
  821. FunctionTitle   = "COMPAQ NetFlex Adapter Card Setup"
  822. ProductSoftwareDescription        = "COMPAQ ENET-TR EISA Driver"
  823. ProductHardwareBONSAIDescription  = "COMPAQ NetFlex-2 DualPort ENET Controller"
  824. ProductHardwareRODANDescription   = "COMPAQ NetFlex-2 DualPort TR Controller"
  825. ProductHardwareNETFLXDescription  = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  826. ProductHardwareDURANGODescription = "COMPAQ Token-Ring Controllers"
  827. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  828. ProductSoftwareTitle            = "COMPAQ ENET-TR Driver"
  829. ProductHardwareBONSAITitle      = "COMPAQ NetFlex-2 DualPort ENET Controller"
  830. ProductHardwareRODANTitle       = "COMPAQ NetFlex-2 DualPort TR Controller"
  831. ProductHardwareNETFLXTitle      = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  832. ProductHardwareDURANGOTitle     = "COMPAQ NetFlex-2 TR Controller"
  833. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  834. ShellCodeErrorText      = "Shell Code Error."
  835. [DialogConstantsENG]
  836. Help        = "&Help"
  837. Exit        = "Cancel"
  838. OK          = "OK"
  839. HelpContext = ""
  840. Continue    = "Continue"
  841. Cancel      = "Cancel"
  842. [FileDependentDlgENG]
  843. #endif
  844.